package com.leen.admin.feign;

import com.leen.admin.feign.factory.AdminFeignClientFallbackFactory;
import com.leen.admin.feign.filter.FeignTokenInterceptor;
import com.leen.common.vo.ResultVO;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 类说明
 *
 * @author admin
 * @date 2021-05-18
 */
@FeignClient(name="LEEN-ADMIN-SERVICE",configuration = FeignTokenInterceptor.class, fallbackFactory = AdminFeignClientFallbackFactory.class)
public interface IAdminFeignClient {

    /**
     * 根据用户名查询它的用角色和权限
     * @param account
     * @return
     */
    @GetMapping(value = "/admin/findByAccount")
    ResultVO<String> findByAccount(@RequestParam("account") String account);


}
